package com.设计模式.observer;

/**
 * @Date 2022/9/7 13:21
 * @Author WangLinBao
 * @Description
 */
public class Baidu implements Observer{
    private String temperature;
    private String humidity;
//    public Baidu(){
//
//    }

    @Override
    public void update(String temperature,String humidity) {
        this.temperature = temperature;
        this.humidity = humidity;
        display();
    }

    private void display() {
        System.out.println("=======Baidu天气======");
        System.out.println(" Baidu温度:" + temperature);
        System.out.println(" Baidu湿度:" + humidity);
    }
}
